import request from "../request";
import {getToken} from "../../utils/auth";

export function selectOrderListByCurrentUser(orderId,payNo,pageNum,pageSize){
    let url = "/api/order/currentUser";
    return request.get(url,{
        headers:{
            Token:getToken()
        },
        params:{
            orderId,payNo,pageNum,pageSize
        }
    })
}

export function selectOrderByOrderId(orderId){
    let url="/api/order/byOrderId";
    return request.get(url,{
        params:{
            orderId
        }
    })
}

export function updateOrderStatusUnsubscribe(orderId){
    let url = "/api/order/unsubscribeOk";
    return request.post(url,null,{
        headers:{
            Token:getToken()
        },
        params:{
            orderId
        }
    })
}